package com.yanghang.controller;

import com.yanghang.entity.City;
import com.yanghang.entity.State;
import com.yanghang.service.StateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StateController {
    @Autowired
    private StateService ss;

    @GetMapping("/states")
    public List<State>selectAllState(){
        return ss.selectAllState();
    }
}
